﻿using System;
using UnityEngine;
using UnityEngine.UI;

namespace SizeboxUI
{
	// Token: 0x020003A9 RID: 937
	public class AIGunSettingsView : SettingsView
	{
		// Token: 0x170003B3 RID: 947
		// (set) Token: 0x060018A2 RID: 6306 RVA: 0x0009B45E File Offset: 0x0009965E
		public GameObject _gameSettings
		{
			set
			{
				this.gameSettings = value;
			}
		}

		// Token: 0x060018A3 RID: 6307 RVA: 0x0009B468 File Offset: 0x00099668
		private void Start()
		{
			base.AddHeader("AI Projectile Collision");
			this.projectileGtsMask = base.AddToggle("Collide with GTS");
			this.projectileGtsMask.onValueChanged.AddListener(delegate(bool value)
			{
				GlobalPreferences.AIProjectileGtsMask.value = value;
			});
			this.projectileMicroMask = base.AddToggle("Collide with Micros");
			this.projectileMicroMask.onValueChanged.AddListener(delegate(bool value)
			{
				GlobalPreferences.AIProjectileMicroMask.value = value;
			});
			this.projectileObjectMask = base.AddToggle("Collide with Objects");
			this.projectileObjectMask.onValueChanged.AddListener(delegate(bool value)
			{
				GlobalPreferences.AIProjectileObjectMask.value = value;
			});
			this.projectilePlayerMask = base.AddToggle("Collide with Player");
			this.projectilePlayerMask.onValueChanged.AddListener(delegate(bool value)
			{
				GlobalPreferences.AIProjectilePlayerMask.value = value;
			});
			base.AddHeader("Default values");
			this.accurateAim = base.AddToggle("Accurate Shooting (No Spread)");
			this.accurateAim.onValueChanged.AddListener(delegate(bool value)
			{
				GlobalPreferences.AIAccurateShooting.value = value;
			});
			this.inaccuracyFactor = base.AddSlider("Inaccuracy Factor", 1f, 30f);
			this.inaccuracyFactor.wholeNumbers = true;
			this.inaccuracyFactor.onValueChanged.AddListener(delegate(float value)
			{
				GlobalPreferences.AIInaccuracyFactor.value = (int)value;
			});
			this.predictiveAim = base.AddToggle("Predictive Aiming (Not Perfect)");
			this.predictiveAim.onValueChanged.AddListener(delegate(bool value)
			{
				GlobalPreferences.AIPredictiveAiming.value = value;
			});
			this.randomIntervals = base.AddToggle("Random Intervals Added (Prevent Syncing)");
			this.randomIntervals.onValueChanged.AddListener(delegate(bool value)
			{
				GlobalPreferences.AIRandomIntervals.value = value;
			});
			this.burstFire = base.AddToggle("Burst Fire By Default");
			this.burstFire.onValueChanged.AddListener(delegate(bool value)
			{
				GlobalPreferences.AIBurstFire.value = value;
			});
			this.projectileSpeedMult = base.AddSlider("Projectile Speed", 1f, 12f);
			this.projectileSpeedMult.wholeNumbers = true;
			this.projectileSpeedMult.onValueChanged.AddListener(delegate(float v)
			{
				GlobalPreferences.AIProjectileSpeed.value = v / 4f;
			});
			this.projectileLifetime = base.AddSlider("Projectile Lifetime", 3f, 10f);
			this.projectileLifetime.wholeNumbers = true;
			this.projectileLifetime.onValueChanged.AddListener(delegate(float v)
			{
				GlobalPreferences.AIProjectileLifetime.value = (int)v;
			});
			this.projectileImpactParticles = base.AddToggle("Display Impact VFX");
			this.projectileImpactParticles.onValueChanged.AddListener(delegate(bool v)
			{
				GlobalPreferences.AIProjectileImpactParticles.value = v;
			});
			this.projectileImpactParticlesSizeMult = base.AddSlider("Impact VFX Size", 0.1f, 2f);
			this.projectileImpactParticlesSizeMult.onValueChanged.AddListener(delegate(float v)
			{
				GlobalPreferences.AIProjectileImpactParticlesSizeMult.value = v;
			});
			base.AddHeader("AI Raygun Projectile Color");
			this.raygunColorR = base.AddSlider("R", 0f, 1f);
			this.raygunColorR.onValueChanged.AddListener(delegate(float value)
			{
				GlobalPreferences.AIRaygunColorR.value = value;
			});
			this.raygunColorG = base.AddSlider("G", 0f, 1f);
			this.raygunColorG.value = GlobalPreferences.AIRaygunColorG.value;
			this.raygunColorB = base.AddSlider("B", 0f, 1f);
			this.raygunColorB.value = GlobalPreferences.AIRaygunColorB.value;
			base.AddHeader("AI SMG Projectile Color");
			this.smgColorR = base.AddSlider("R", 0f, 1f);
			this.smgColorR.value = GlobalPreferences.AISMGColorR.value;
			this.smgColorG = base.AddSlider("G", 0f, 1f);
			this.smgColorG.value = GlobalPreferences.AISMGColorG.value;
			this.smgColorB = base.AddSlider("B", 0f, 1f);
			this.smgColorB.value = GlobalPreferences.AISMGColorB.value;
			this.UpdateValues();
			this.initialized = true;
		}

		// Token: 0x060018A4 RID: 6308 RVA: 0x0009B95C File Offset: 0x00099B5C
		protected override void UpdateValues()
		{
			this.projectileGtsMask.isOn = GlobalPreferences.AIProjectileGtsMask.value;
			this.projectileMicroMask.isOn = GlobalPreferences.AIProjectileMicroMask.value;
			this.projectileObjectMask.isOn = GlobalPreferences.AIProjectileObjectMask.value;
			this.projectilePlayerMask.isOn = GlobalPreferences.AIProjectilePlayerMask.value;
			this.accurateAim.isOn = GlobalPreferences.AIAccurateShooting.value;
			this.inaccuracyFactor.value = (float)GlobalPreferences.AIInaccuracyFactor.value;
			this.predictiveAim.isOn = GlobalPreferences.AIPredictiveAiming.value;
			this.randomIntervals.isOn = GlobalPreferences.AIRandomIntervals.value;
			this.burstFire.isOn = GlobalPreferences.AIBurstFire.value;
			this.projectileLifetime.value = (float)GlobalPreferences.AIProjectileLifetime.value;
			this.projectileSpeedMult.value = GlobalPreferences.AIProjectileSpeed.value * 4f;
			this.projectileImpactParticles.isOn = GlobalPreferences.AIProjectileImpactParticles.value;
			this.projectileImpactParticlesSizeMult.value = GlobalPreferences.AIProjectileImpactParticlesSizeMult.value;
			this.raygunColorR.value = GlobalPreferences.AIRaygunColorR.value;
			this.raygunColorG.value = GlobalPreferences.AIRaygunColorG.value;
			this.raygunColorB.value = GlobalPreferences.AIRaygunColorB.value;
			this.smgColorR.value = GlobalPreferences.AISMGColorR.value;
			this.smgColorG.value = GlobalPreferences.AISMGColorG.value;
			this.smgColorB.value = GlobalPreferences.AISMGColorB.value;
		}

		// Token: 0x04001AB4 RID: 6836
		private Toggle projectileGtsMask;

		// Token: 0x04001AB5 RID: 6837
		private Toggle projectileMicroMask;

		// Token: 0x04001AB6 RID: 6838
		private Toggle projectileObjectMask;

		// Token: 0x04001AB7 RID: 6839
		private Toggle projectilePlayerMask;

		// Token: 0x04001AB8 RID: 6840
		private Slider raygunColorR;

		// Token: 0x04001AB9 RID: 6841
		private Slider raygunColorG;

		// Token: 0x04001ABA RID: 6842
		private Slider raygunColorB;

		// Token: 0x04001ABB RID: 6843
		private Slider smgColorR;

		// Token: 0x04001ABC RID: 6844
		private Slider smgColorG;

		// Token: 0x04001ABD RID: 6845
		private Slider smgColorB;

		// Token: 0x04001ABE RID: 6846
		private Toggle accurateAim;

		// Token: 0x04001ABF RID: 6847
		private Slider inaccuracyFactor;

		// Token: 0x04001AC0 RID: 6848
		private Toggle predictiveAim;

		// Token: 0x04001AC1 RID: 6849
		private Toggle randomIntervals;

		// Token: 0x04001AC2 RID: 6850
		private Toggle burstFire;

		// Token: 0x04001AC3 RID: 6851
		private Slider projectileLifetime;

		// Token: 0x04001AC4 RID: 6852
		private Slider projectileSpeedMult;

		// Token: 0x04001AC5 RID: 6853
		private Toggle projectileImpactParticles;

		// Token: 0x04001AC6 RID: 6854
		private Slider projectileImpactParticlesSizeMult;

		// Token: 0x04001AC7 RID: 6855
		private GameObject gameSettings;
	}
}
